package com.qingzhuge.pageview.entity;

import com.qingzhuge.entity.BasePkLongEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.redis.core.RedisHash;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author : zero.xiao
 * @description : 系统浏览量统计
 * @date : 2019/1/16 0016 下午 17:14
 * @modified :
 * @since :
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "sys_page_view")
public class SysPageView extends BasePkLongEntity {
    private static final long serialVersionUID = 4725248327868407101L;
    @Column(insertable = false)
    @LastModifiedDate
    private Date updateTime;
    /**系统模块*/
    private String module;
    /**对象id*/
    private String objId;
    /**浏览量*/
    private int vp;

    public SysPageView() {
    }

    public SysPageView(int vp) {
        this.vp = vp;
    }

    public SysPageView(String module, String objId, int vp) {
        this.module = module;
        this.objId = objId;
        this.vp = vp;
    }
}
